﻿@model PrjctMngmt.Models.Milestone

<script type="text/javascript">
    $(function () {
        $(".datetimepicker").datetimepicker({
            showSecond: true,
            timeFormat: 'hh:mm:ss',
            dateFormat: 'dd-mm-yy'
        });
    });
</script>

@using (Html.BeginForm("Create", "Milestone", FormMethod.Post, new { id = "MilestoneForm" })) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Milestone</legend>

        <p>* indicates a required field.</p>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name) *
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            Due date
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.DueDate, new { @class = "datetimepicker" })
            @Html.ValidationMessageFor(model => model.DueDate)
        </div>

        <div class="editor-label">
            Project
        </div>
        <div class="editor-field">
            @Html.DropDownList("ProjectID", (IEnumerable<SelectListItem>) ViewData["Projects"], "")
        </div>
    </fieldset>
}
